package apiday01String;

public class StringBuilder4种方法 {
    public static void main(String[] args) {
        String a="好好学习";
        StringBuilder sb = new StringBuilder(a);
        sb.append(",天天向下");
        System.out.println(sb);//"好好学习,天天向下"
        sb.replace(4,9,"，找高新工作");
        System.out.println(sb);
        sb.delete(0,5);
        System.out.println(sb);
        sb.insert(0,"活着");
        System.out.println(sb);

        /**
         * append() 在末尾添加字符
         * replace（开始下标,结尾下标,“替换的字符串”）替换字符
         * delete（开始下标,结尾下标）删除字符
         * insert（开始下标,“插入的字符串”）插入字符的方法
         * */


    }
}
